package com.yaorange.certificate.controller.wxapi;

import com.yaorange.certificate.bo.RegisterVo;
import com.yaorange.certificate.service.INjtAreaService;
import com.yaorange.certificate.service.INjtUserRegisterService;
import com.yaorange.common.core.controller.BaseController;
import com.yaorange.common.core.domain.AjaxResult;
import com.yaorange.common.core.domain.model.LoginBody;
import com.yaorange.framework.web.service.SysLoginService;
import com.yaorange.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 小程序api
 *
 * @author coach tam
 * @email 327395128@qq.com
 * @values 坚持灵活 灵活坚持
 * @since 2025/1/16
 */
@RestController
@RequestMapping("/api/area")
public class NjtAreaAPI extends BaseController {

    @Autowired
    private INjtAreaService areaService;

    @GetMapping("/queryListRoot")
    public AjaxResult queryListRoot() {
        return AjaxResult.success(areaService.queryDefaultRootList());
    }

    @GetMapping("/queryChildrenByParentCode")
    public AjaxResult queryChildrenByParentCode(@RequestParam("parentCode")String parentCode) {
        return AjaxResult.success(areaService.selectNjtAreaListByParentCode(parentCode));
    }


}
